package com.ruoyi.student.api.factory;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.student.api.StudentService;
import com.ruoyi.student.domain.TStudent;
import org.springframework.cloud.openfeign.FallbackFactory;

public class StudentServicefallbackFactory implements FallbackFactory<StudentService> {
    @Override
    public StudentService create(Throwable cause) {
        return new StudentService() {
            @Override
            public AjaxResult findStudentByName(String name) {
                return AjaxResult.error(-1, "网络延迟，请稍后再试");
            }
        };
    }
}
